Information processing apparatus, information processing method, and non-transitory computer readable medium

ABSTRACT

An information processing apparatus includes first and second central processing units, a communication unit, and a memory. The first and second central processing units operate based on first and second operating systems, respectively. The communication unit controls communication between the first and second operating systems. The memory includes first and second memory areas used respectively by the first and second operating systems. The first operating system includes a memory access requesting unit. The memory access requesting unit sends, to the second operating system via the communication unit, a request to write information to be moved from the first memory area to a virtual memory and a request to read information to be moved from the virtual memory to the first memory area. The second operating system writes to and reads from the second memory area, the information indicated by the write and read requests, respectively.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is based on and claims priority under 35 USC 119 fromJapanese Patent Application No. 2014-257134 filed Dec. 19, 2014.

BACKGROUND

1. Technical Field

The present invention relates to an information processing apparatus, aninformation processing method, and a non-transitory computer readablemedium.

2. Summary

According to an aspect of the present invention, there is provided aninformation processing apparatus including a first central processingunit, a second central processing unit, a communication unit, and amemory. The first central processing unit operates based on a firstoperating system having a virtual memory function. The second centralprocessing unit operates based on a second operating system. Thecommunication unit controls communication between the first operatingsystem and the second operating system. The memory includes a firstmemory area used by the first operating system and a second memory areaused by the second operating system. The first operating system includesa memory access requesting unit. The memory access requesting unitsends, to the second operating system via the communication unit, awrite request to write information to be moved from the first memoryarea to a virtual memory and a read request to read information to bemoved from the virtual memory to the first memory area. The secondoperating system writes, to the second memory area, the informationindicated by the write request sent by the memory access requesting unitand reads, from the second memory area, the information indicated by theread request sent by the memory access requesting unit.

BRIEF DESCRIPTION OF THE DRAWINGS

Exemplary embodiments of the present invention will be described indetail based on the following figures, wherein:

FIG. 1 is a block diagram illustrating an example of a configuration ofan information processing apparatus according to a first exemplaryembodiment;

FIG. 2 is a block diagram illustrating an example of a configuration ofan information processing apparatus according to a second exemplaryembodiment; and

FIG. 3 is a block diagram illustrating an example of a configuration ofan information processing apparatus according to a third exemplaryembodiment.

DETAILED DESCRIPTION First Exemplary Embodiment

Configuration of Information Processing Apparatus

FIG. 1 is a block diagram illustrating an example of a configuration ofan information processing apparatus according to a first exemplaryembodiment.

An information processing apparatus 5 includes a first centralprocessing unit (CPU) 1, a second CPU 2, and a memory device 3. Each ofthe first CPU 1 and the second CPU 2 controls individual components andexecutes various programs. The memory device 3 is a volatilesemiconductor memory, such as a random access memory (RAM) to whichinformation is writable and from which information is readable. Theinformation processing apparatus 5 is a loosely coupled multi-processorsystem in which the first CPU 1, the second CPU 2, and the memory device3 are connected to one another via a system bus.

The information processing apparatus 5 is, for example, an apparatushaving image-formation-related functions such as a copy function, a scanfunction, a print function, and a fax function, and network-relatedfunctions such as coordination with cloud and web services. Theinformation processing apparatus 5 includes functional units such as anoptical scanning unit (not illustrated), a printing unit (notillustrated), a fax unit (not illustrated), and a communication unit(not illustrated) which are controlled by the first CPU 1 and the secondCPU 2.

The first CPU 1 operates based on a first operating system (OS) 1 awhich is a general-purpose OS having a lower real-time processingcapability than a second OS 2 a. The first OS 1 a is, for example, Linux(registered trademark) and is typically used to control functional unitsthat implement network-related functions such as coordination with cloudand web services.

The first OS 1 a also has a virtual memory function which allows asecondary memory device that is accessed via a block device to bevirtually handled as a memory in addition to a directly accessibleprimary memory device.

The second CPU 2 operates based on the second OS 2 a which is areal-time OS. The second OS 2 a is, for example, ITRON (registeredtrademark) or vxWorks (registered trademark) and is typically used tocontrol functional units that implement image-formation-relatedfunctions such as a copy function, a scan function, a print function,and a fax function. Note that the term “real-time processing capability”refers to a capability of completing a job within a predetermined periodof time in response to a request to execute the job, and the term“real-time OS” refers to an OS having the real-time processingcapability.

The first OS 1 a and the second OS 2 a respectively function as a resultof the first CPU 1 and the second CPU 2 loading and executing programsstored in a ROM (not illustrated), for example.

The memory device 3 includes a first memory area 31 used by the first OS1 a and a second memory area 32 used by the second OS 2 a but does notinclude a memory area shared by the first OS 1 a and the second OS 2 a.Although a single memory device 3 is illustrated in FIG. 1, theinformation processing apparatus 5 may include multiple memory devices3. In such a case, the first memory area 31 and the second memory area32 may be provided in different memory devices.

The first OS 1 a includes a virtual block device 10 capable of swappingout information stored in the first memory area 31 and writing theinformation thereto. The information written to the virtual block device10 is transferred to the second OS 2 a via an inter-OS communicationunit 11 (described later) and is written to the second memory area 32.In response to a request to write back (swap in) swapped-out informationmade by the first OS 1 a, the information in the second memory area 32is written back to the first memory area 31 via the inter-OScommunication unit 11 and the virtual block device 10. The virtual blockdevice 10 is implemented by a device file, for example.

The inter-OS communication unit 11 controls communication between thefirst OS 1 a and the second OS 2 a via the system bus. The first OS 1 aand the second OS 2 a communicate with each other by sending andreceiving messages.

Operations of Information Processing Apparatus

Now, operations according to the first exemplary embodiment will bedescribed in terms of (1) a basic operation, (2) a swap-out operation,and (3) a swap-in operation.

(1) Basic Operation

Upon receipt of a request, the first CPU 1 and the second CPU 2respectively process the received request by using functions of thefirst OS 1 a and the second OS 2 a. While the request is beingprocessed, information being processed is temporarily stored in thefirst memory area 31 and the second memory area 32. That is, the firstCPU 1 and the second CPU 2 respectively use the first memory area 31 andthe second memory area 32 as a directly accessible primary memorydevice.

The first OS 1 a has a virtual memory function. Accordingly, the firstCPU 1 writes, to a secondary memory device, information that is not usedfor a while among pieces of information stored in the first memory area31. The following describes an operation performed when the first OS 1 auses, as the secondary memory device, the second memory area 32 that isused by the second OS 2 a as the primary memory device.

(2) Swap-out Operation

To swap out information stored in the first memory area 31, the first OS1 a writes the information to the virtual block device 10.

The virtual block device 10 transfers the information written thereto tothe second OS 2 a via the inter-OS communication unit 11.

The second OS 2 a writes the received information to the second memoryarea 32.

The above-described operation allows the first OS 1 a to virtuallyexpand a memory area and to store information being processed in anavailable area created in the first memory area 31.

(3) Swap-in Operation

The first OS 1 a then requests the virtual block device 10 to swap inthe swapped-out information stored in the second memory area 32 beforeprocessing the information.

The virtual block device 10 requests, via the inter-OS communicationunit 11, the second OS 2 a to read the information.

The second OS 2 a reads the information stored in the second memory area32 and sends the information to the virtual block device 10 via theinter-OS communication unit 11.

The virtual block device 10 then writes the received information to thefirst memory area 31.

Second Exemplary Embodiment

In a second exemplary embodiment, a case where the first OS 1 a supportsa 32-bit virtual address space will be described. That is, a case willbe described where the first OS 1 a is permitted to use a memory area ofapproximately 3 gigabytes (GB) of the primary memory device and is notpermitted to use the rest of the memory area even if the primary memorydevice has a memory capacity greater than 3 GB.

Configuration of Information Processing Apparatus

FIG. 2 is a block diagram illustrating an example of a configuration ofan information processing apparatus according to the second exemplaryembodiment.

An information processing apparatus 5 a includes the first CPU 1, thesecond CPU 2, a memory device 3 a, and a memory device which the secondOS 2 a uses as a second memory area 32 a. The information processingapparatus 5 a is a loosely coupled multi-processor system in which thefirst CPU 1, the second CPU 2, the memory device 3 a, and the memorydevice are connected to one another via a system bus.

The memory device 3 a is, for example, a RAM having a capacity of 4 GB.A first memory area 31 a used by the first OS 1 a among the memory areaof the memory device 3 a is approximately 3 GB. The rest of the memoryarea, that is, a third memory area 32 b of 1 GB, is made available tothe second OS 2 a.

The second memory area 32 a is provided in a memory device differentfrom the memory device 3 a in FIG. 2; however, the second memory area 32a may be prepared as another memory area in the memory device 3 a.

The virtual block device 10 transfers information written thereto to thesecond OS 2 a via the inter-OS communication unit 11. The information isthen directly written to the third memory area 32 b by using, forexample, direct memory access (DMA) without being copied in the secondmemory area 32 a. In response to a swap-in request from the first OS 1a, the information written to the third memory area 32 b is written backto the first memory area 31 a via the inter-OS communication unit 11 andthe virtual block device 10.

Operations of Information Processing Apparatus

Now, operations according to the second exemplary embodiment will bedescribed in terms of (1) a basic operation, (2) a swap-out operation,and (3) a swap-in operation.

(1) Basic Operation

Upon receipt of a request, the first CPU 1 and the second CPU 2respectively process the received request by using functions of thefirst OS 1 a and the second OS 2 a. While the request is beingprocessed, information being processed is temporarily stored in thefirst memory area 31 a and the second memory area 32 a. That is, thefirst CPU 1 and the second CPU 2 respectively use the first memory area31 a and the second memory area 32 a as a directly accessible primarymemory device.

The first OS 1 a has a virtual memory function. Accordingly, the firstCPU 1 writes, to a secondary memory device, information that is not usedfor a while among pieces of information stored in the first memory area31 a. The following describes an operation performed when the first OS 1a uses, as the secondary memory device, the third memory area 32 b thatis used by the second OS 2 a as the secondary memory device.

(2) Swap-out Operation

To swap out information stored in the first memory area 31 a, the firstOS 1 a writes the information to the virtual block device 10.

The virtual block device 10 transfers the information written thereto tothe second OS 2 a via the inter-OS communication unit 11.

The second OS 2 a writes the received information to the third memoryarea 32 b.

The above-described operation allows the first OS 1 a to virtuallyexpand a memory area and to store information being processed in anavailable area created in the first memory area 31 a.

(3) Swap-in Operation

The first OS 1 a then requests the virtual block device 10 to swap inthe swapped-out information stored in the third memory area 32 b beforeprocessing the information.

The virtual block device 10 requests, via the inter-OS communicationunit 11, the second OS 2 a to read the information.

The second OS 2 a reads the information stored in the third memory area32 b and sends the information to the virtual block device 10 via theinter-OS communication unit 11.

The virtual block device 10 writes the received information to the firstmemory area 31 a.

The above-described operation allows the first OS 1 a to use, as avirtual memory area, the third memory area 32 b which is a part of thememory area of the memory device 3 a which the first OS 1 a is notpermitted to access.

The memory device 3 a is a RAM. This configuration makes the speed ofprocessing higher than in the case of using a device such as a hard diskdrive as the virtual memory, even if communication between the first OS1 a and the second OS 2 a is taken into account.

Third Exemplary Embodiment

In a third exemplary embodiment, a case where the configurationaccording to the second exemplary embodiment further includes acompressor will be described.

Configuration of Information Processing Apparatus

FIG. 3 is a block diagram illustrating an example of a configuration ofan information processing apparatus according to a third exemplaryembodiment.

An information processing apparatus 5 b includes the first CPU 1, thesecond CPU 2, the memory device 3 a, and a memory device which thesecond OS 2 a uses as the second memory area 32 a. The informationprocessing apparatus 5 b is a loosely coupled multi-processor system inwhich the first CPU 1, the second CPU 2, the memory device 3 a, and thememory device are connected to one another via a system bus.

The information processing apparatus 5 b further includes a compressor21 that compresses information and reduces the amount of data. Thecompressor 21 compresses information to be written to the third memoryarea 32 b by the second OS 2 a.

Operations of Information Processing Apparatus

Now, operations according to the third exemplary embodiment will bedescribed in term of (1) a swap-out operation and (2) a swap-inoperation.

(1) Swap-out Operation

To swap out information stored in the first memory area 31 a, the firstOS 1 a writes the information to the virtual block device 10.

The virtual block device 10 transfers the information written thereto tothe second OS 2 a via the inter-OS communication unit 11.

The second OS 2 a compresses the received information by using thecompressor 21 and writes the compressed information to the third memoryarea 32 b.

(2) Swap-in Operation

The first OS 1 a then requests the virtual block device 10 to swap inthe swapped-out information stored in the third memory area 32 b beforeprocessing the information.

The virtual block device 10 requests, via the inter-OS communicationunit 11, the second OS 2 a to read the information.

The second OS 2 a reads the information stored in the third memory area32 b, decompresses the information, and sends the decompressedinformation to the virtual block device 10 via the inter-OScommunication unit 11.

The virtual block device 10 writes the received information to the firstmemory area 31 a.

The above-described operation allows the first OS 1 a to use, as avirtual memory area, the third memory area 32 b which is a part of thememory area of the memory device 3 a which the first OS 1 a is notpermitted to access and to store an increased amount of information inthe virtual memory area because the information is compressed by thecompressor 21.

Even if the third memory area 32 b is an area which the first OS 1 a ispermitted to access, compressing information through the above-describedoperation makes the total amount of memory used smaller than that usedin the case of directly storing the information.

Other Exemplary Embodiments

The present invention is not limited to the exemplary embodimentsdescribed above, and various modifications may occur within the scopenot departing from the gist of the present invention.

The order of the steps of the operations described in the exemplaryembodiments may be changed, some of the steps may be omitted, or a stepmay be added, within the scope not changing the gist of the presentinvention.

The foregoing description of the exemplary embodiments of the presentinvention has been provided for the purposes of illustration anddescription. It is not intended to be exhaustive or to limit theinvention to the precise forms disclosed. Obviously, many modificationsand variations will be apparent to practitioners skilled in the art. Theembodiments were chosen and described in order to best explain theprinciples of the invention and its practical applications, therebyenabling others skilled in the art to understand the invention forvarious embodiments and with the various modifications as are suited tothe particular use contemplated. It is intended that the scope of theinvention be defined by the following claims and their equivalents.

What is claimed is:
 1. An information processing apparatus comprising: afirst central processing unit that operates based on a first operatingsystem having a virtual memory function; a second central processingunit that operates based on a second operating system; a communicationunit that controls communication between the first operating system andthe second operating system; and a memory including a first memory areaused by the first operating system and a second memory area used by thesecond operating system, wherein the first operating system includes amemory access requesting unit that sends, to the second operating systemvia the communication unit, a write request to write information to bemoved from the first memory area to a virtual memory, and a read requestto read information to be moved from the virtual memory to the firstmemory area, and the second operating system writes, to the secondmemory area, the information indicated by the write request sent by thememory access requesting unit, and reads, from the second memory area,the information indicated by the read request sent by the memory accessrequesting unit.
 2. The information processing apparatus according toclaim 1, wherein the second memory area and the first memory area areprovided in a single memory, and the second memory area is an area whichthe first operating system is not permitted to directly use due to aconstraint on the first operating system.
 3. An information processingmethod comprising: sending, with a first operating system having avirtual memory function, to a second operating system, a write requestto write information to be moved from a first memory area used by thefirst operating system to a virtual memory; sending, with the firstoperating system, to the second operating system, a read request to readinformation to be moved from the virtual memory to the first memoryarea; writing, with the second operating system, the informationindicated by the write request to a second memory area used by thesecond operating system; and reading, with the second operating system,the information indicated by the read request from the second memoryarea.
 4. A non-transitory computer readable medium storing a programcausing a computer to execute a process for information processing, theprocess comprising: sending, with a first operating system having avirtual memory function, to a second operating system, a write requestto write information to be moved from a first memory area used by thefirst operating system to a virtual memory; sending, with the firstoperating system, to the second operating system, a read request to readinformation to be moved from the virtual memory to the first memoryarea; writing, with the second operating system, the informationindicated by the write request to a second memory area used by thesecond operating system; and reading, with the second operating system,the information indicated by the read request from the second memoryarea.